#include <bits/stdc++.h>
using namespace std;
int m1 = 1, k, n1 = 1, m, temp;
int main()
{
	cin >> k;
	while(m1 + n1 < k)
	{
		m = m1 + n1;
		temp = m1;
		m1 = m;
		n1 = temp;
	}
	cout << n1 << " " << m1 << endl;
	return 0;
}